#!/bin/sh
cleandig a.host.test.dyndns ANY dnssec hidesoadetails
cleandig b.host.test.dyndns ANY dnssec hidesoadetails
cleandig c.host.test.dyndns ANY dnssec hidesoadetails
cleandig d.host.test.dyndns ANY dnssec hidesoadetails
cleandig e.host.test.dyndns ANY dnssec hidesoadetails
cleandig f.host.test.dyndns ANY dnssec hidesoadetails
cleandig a.a.host.test.dyndns ANY dnssec hidesoadetails
cleandig b.b.host.test.dyndns ANY dnssec hidesoadetails
cleandig c.c.host.test.dyndns ANY dnssec hidesoadetails
cleandig d.d.host.test.dyndns ANY dnssec hidesoadetails
cleandig e.e.host.test.dyndns ANY dnssec hidesoadetails

mysqldiff

cleannsupdate <<!
server $nameserver $port
zone test.dyndns
update add c.host.test.dyndns 3600 NS ns1.c.host.test.dyndns
update add ns1.c.host.test.dyndns 3600 A 192.168.0.1
send
answer
!

mysqldiff 1 "Check if delegate and glue are added correctly."

cleandig a.host.test.dyndns ANY dnssec hidesoadetails
cleandig b.host.test.dyndns ANY dnssec hidesoadetails
cleandig c.host.test.dyndns ANY dnssec hidesoadetails
cleandig d.host.test.dyndns ANY dnssec hidesoadetails
cleandig e.host.test.dyndns ANY dnssec hidesoadetails
cleandig f.host.test.dyndns ANY dnssec hidesoadetails
cleandig a.a.host.test.dyndns ANY dnssec hidesoadetails
cleandig b.b.host.test.dyndns ANY dnssec hidesoadetails
cleandig c.c.host.test.dyndns ANY dnssec hidesoadetails
cleandig d.d.host.test.dyndns ANY dnssec hidesoadetails
cleandig e.e.host.test.dyndns ANY dnssec hidesoadetails

cleannsupdate <<!
server $nameserver $port
zone test.dyndns
update delete c.host.test.dyndns NS
send
answer
!

mysqldiff 2 "Check if delegate is deleted and glue auth=1"

cleandig a.host.test.dyndns ANY dnssec hidesoadetails
cleandig b.host.test.dyndns ANY dnssec hidesoadetails
cleandig c.host.test.dyndns ANY dnssec hidesoadetails
cleandig d.host.test.dyndns ANY dnssec hidesoadetails
cleandig e.host.test.dyndns ANY dnssec hidesoadetails
cleandig f.host.test.dyndns ANY dnssec hidesoadetails
cleandig a.a.host.test.dyndns ANY dnssec hidesoadetails
cleandig b.b.host.test.dyndns ANY dnssec hidesoadetails
cleandig c.c.host.test.dyndns ANY dnssec hidesoadetails
cleandig d.d.host.test.dyndns ANY dnssec hidesoadetails
cleandig e.e.host.test.dyndns ANY dnssec hidesoadetails

cleannsupdate <<!
server $nameserver $port
zone test.dyndns
update delete ns1.c.host.test.dyndns A
send
answer
!

mysqldiff 3 "Check if we are back to normal"

cleandig a.host.test.dyndns ANY dnssec hidesoadetails
cleandig b.host.test.dyndns ANY dnssec hidesoadetails
cleandig c.host.test.dyndns ANY dnssec hidesoadetails
cleandig d.host.test.dyndns ANY dnssec hidesoadetails
cleandig e.host.test.dyndns ANY dnssec hidesoadetails
cleandig f.host.test.dyndns ANY dnssec hidesoadetails
cleandig a.a.host.test.dyndns ANY dnssec hidesoadetails
cleandig b.b.host.test.dyndns ANY dnssec hidesoadetails
cleandig c.c.host.test.dyndns ANY dnssec hidesoadetails
cleandig d.d.host.test.dyndns ANY dnssec hidesoadetails
cleandig e.e.host.test.dyndns ANY dnssec hidesoadetails
